package com.wash.shoes.request;

import com.ruoyi.common.core.domain.model.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 工厂派单配置请求对象
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class FactoryDispatchRequest extends BaseModel {

    @ApiModelProperty(value = "工厂id")
    @NotNull(message = "工厂id不能为空")
    private String factoryId;
    @ApiModelProperty(value = "工厂派单配置记录")
    private List<FactoryDispatchConfigRecord> data;

    /**
     * 工厂派单配置记录
     */
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @ApiModel("工厂派单配置记录")
    public static class FactoryDispatchConfigRecord extends BaseModel {
        @ApiModelProperty(value = "品牌id")
        private String brandId;
        @ApiModelProperty(value = "区域配置")
        @NotNull(message = "区域配置不能为空")
        private List<AreaConfigRecord> records;
    }

    @ApiModel("区域配置")
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class AreaConfigRecord extends BaseModel {
        @ApiModelProperty(value = "省")
        @NotNull(message = "省不能为空")
        private String provinces;
        @ApiModelProperty(value = "市")
        private String city;
        @ApiModelProperty(value = "区")
        private String country;

        @ApiModelProperty(value = "地址id用于前端回显")
        private String code;



    }
}
